package net.wangds.persistence.columnoriented.conv;

import net.wangds.jdbc.comp.jdbc.JdbcComp;
import net.wangds.persistence.def.repo.db.DictFieldRepo;
import net.wangds.persistence.def.repo.db.DictTableRepo;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * .
 * <p></p>
 *
 * @author 王东石 2020/10/30 21:59.
 */
public abstract class AbstractColumnOrientedConv {

    /**
     * 操作表字典表.
     */
    @Autowired
    protected DictTableRepo repoDictTbl;

    /**
     * 字段表操作句柄.
     */
    @Autowired
    protected DictFieldRepo repoDictFld;

    /**
     * JDBC操作类.
     */
    @Autowired
    protected JdbcComp cmpJdbc;

    @SuppressWarnings("unchecked")
    protected <T> Class<T> getBeanClassByName(String clzName) {
        try {
            return (Class<T>)Class.forName(clzName);
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
    }
}
